package com.lzq.mq.client.consumer;

import com.lzq.mq.common.enums.ClientConsumeRespStatus;
import lombok.Getter;
import lombok.Setter;

/**
 * 消费结果
 */
@Setter
@Getter
public class ConsumeResult {

    /**
     * 消费结果
     * @see ClientConsumeRespStatus
     */
    private int consumeResultStatus;

    public ConsumeResult(int consumeResultStatus) {
        this.consumeResultStatus = consumeResultStatus;
    }

    public static ConsumeResult CONSUME_SUCCESS() {
        return new ConsumeResult(ClientConsumeRespStatus.CONSUME_SUCCESS.getCode());
    }

    public static ConsumeResult CONSUME_LATER() {
        return new ConsumeResult(ClientConsumeRespStatus.CONSUME_LATER.getCode());
    }
}
